<!DOCTYPE html>
<html lang="zh_CN">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
<script type="text/javascript">
    var str = '12ab23cde34f45';

    /*需求是把连续的整数找出来： [12, 23, 34, 45]*/
    function findNumberInString(str) {
        // 正则
        var reg = /\d+/ig;
        return str.match(reg);
    }

    console.log(findNumberInString(str));

</script>

</html>
